package org.jeecg.modules.car.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.system.entity.BaseEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Description: 车场信息表
 * @Author: jeecg-boot
 * @Date:   2019-07-10
 * @Version: V1.0
 */
@Data
@TableName("car_park_info")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="car_park_info对象", description="车场信息表")
public class CarParkInfo extends BaseEntity {
    
	/**记录id*/
	@TableId(type = IdType.ID_WORKER_STR)
    @ApiModelProperty(value = "记录id")
	private String id;

	/**外接系统id(JGS:金广盛)*/
    @ApiModelProperty(value = "外接系统编号(JGS:金广盛)")
	private String outCode;
	/**外接系统车场id*/
    @ApiModelProperty(value = "外接系统车场id")
	private String outSysId;
	/**物业公司id*/
	@ApiModelProperty(value = "物业公司id")
	private String tenantId;
	/**社区id*/
	@ApiModelProperty(value = "项目")
	private String projectId;
	/**项目名称*/
	@Excel(name="项目名称",width = 15)
    @ApiModelProperty(value = "项目名称")
	private String projectName;

	/**外接系统车场名称*/
	@Excel(name = "车场名称", width = 15)
    @ApiModelProperty(value = "车场名称")
	private String parkName;

	@ApiModelProperty(value = "监管平台车场id")
	private String superviseParkingId;
	@ApiModelProperty(value = "监管平台appId")
	private String superviseAppId;
	@ApiModelProperty(value = "监管平台password")
	private String supervisePassword;

	/**车位数*/
	@Excel(name = "车位数", width = 15)
    @ApiModelProperty(value = "车位数")
	private Integer carportNum;

	@ApiModelProperty(value = "到期短信预通知天数")
	private Integer smsDay;

	/**开卡是否需要审核(原filed5)*/
//	@Excel(name="开卡审核", width = 15,dicCode = "is_or_not")
    @ApiModelProperty(value = "开卡是否需要审核")
	private Boolean isCheckOpenCard;

	@Excel(name="开卡审核", width = 15)
	@TableField(exist = false)
	private String isCheckOpenCardStr;

	@ApiModelProperty(value = "添加贵宾车是否需要审核")
	private Boolean isCheckVip;

	@Excel(name="贵宾车审核", width = 15)
	@TableField(exist = false)
	private String isCheckVipStr;

	/**车场是否同步物业费(原filed6)*/
//    @ApiModelProperty(value = "是否关联物业费")
//	private Boolean isBindFee;

    @ApiModelProperty(value = "是否到期发送短信")
    private Boolean isSms;

//    @Excel(name="是否关联物业费", width = 15)
//    @TableField(exist = false)
//    private String isBindFeeStr;

	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
	private String remark;
	/**状态 0:未使用 1:使用*/

    @ApiModelProperty(value = "状态 0:未使用 1:使用")
	private Integer status;
	/**记录创建时间*/

	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "记录创建时间")
	private Date createTime;
	/**记录修改时间*/

	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "记录修改时间")
	private Date updateTime;
	/**createBy*/

    @ApiModelProperty(value = "createBy")
	private String createBy;
	/**updateBy*/

    @ApiModelProperty(value = "updateBy")
	private String updateBy;

	@TableLogic
    @ApiModelProperty(value = "delFlag")
	@Dict(dicCode = "del_flag")
	private String delFlag;
	/**remarks*/
    @ApiModelProperty(value = "remarks")
	private String remarks;


	public String getIsCheckOpenCardStr() {
		if (isCheckOpenCard != null){
			if (isCheckOpenCard) {
				this.isCheckOpenCardStr = "需要审核";
			} else {
				this.isCheckOpenCardStr = "无需审核";
			}
		}
		return isCheckOpenCardStr;
	}

	public String getIsCheckVipStr() {
		if (isCheckVip != null){
			if (isCheckVip) {
				this.isCheckVipStr = "需要审核";
			} else {
				this.isCheckVipStr = "无需审核";
			}
		}
		return isCheckVipStr;
	}

//	public String getIsBindFeeStr() {
//		if (isBindFee != null){
//			if (isBindFee) {
//				this.isBindFeeStr = "联动";
//			} else {
//				this.isBindFeeStr = "不联动";
//			}
//		}
//		return isBindFeeStr;
//	}
}
